Skip to content

RDKEMW-23367 : ctrlm-main - coverity issues - #269

Open
dwolaver wants to merge 3 commits into
developfrom
feature/RDKEMW-23367_ctrlm_main_coverity_issues
Open

RDKEMW-23367 : ctrlm-main - coverity issues#269
dwolaver wants to merge 3 commits into
developfrom
feature/RDKEMW-23367_ctrlm_main_coverity_issues

Conversation

@dwolaver

Copy link
Copy Markdown
Contributor

No description provided.

@dwolaver
dwolaver marked this pull request as ready for review August 12, 2026 15:07
@dwolaver
dwolaver requested a review from a team as a code owner August 12, 2026 15:07
Copilot AI lite review requested due to automatic review settings August 12, 2026 15:07

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Addresses Coverity findings in ctrlm-main by tightening memory/thread lifecycle handling and making persisted shutdown-time serialization robust across 32-bit vs 64-bit time_t platforms.

Changes:

  • Fix old-style voice settings DB blob cleanup by using ctrlm_db_free() consistently.
  • Rework HAL-termination synchronization to use an owned sem_t plus atomic ref-counting to avoid leaks/use-after-free across threads.
  • Serialize/deserialize shutdown time using sizeof(time_t) while still accepting legacy 4-byte payloads.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
src/voice/ctrlm_voice_obj.cpp Ensures voice settings blob read from DB is freed via ctrlm_db_free() in all paths.
src/ctrlm_network.h Updates termination thread data struct to embed a semaphore and add atomic ref-counting.
src/ctrlm_network.cpp Adds ref-counted cleanup and proper semaphore init/destroy for safe termination-thread coordination.
src/ctrlm_main.cpp Updates shutdown-time packing/unpacking to handle 64-bit time_t while supporting legacy 4-byte format.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@jthomp007c jthomp007c left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved for test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants